home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 4
/
QRZ Ham Radio Callsign Database - Volume 4.iso
/
files
/
dsp
/
56ktools
/
a56_10sh.z
/
a56_10sh
/
examples
/
memtest.a56
< prev
next >
Wrap
Text File
|
1992-06-06
|
2KB
|
116 lines
; simple memory test - runs test patterns through off-chip RAM
;
; written by Quinn Jensen (jensenq@npd.novell.com)
;
include 'ioequ.inc'
#define MSG(m) movep #(m)<<7,x:m_pbd
start equ $0000
len equ $ff00
org p:$0000
jmp begin
org p:$40
begin
movep #$0f0f,x:m_bcr ;wait states
movep #0,x:m_pbc ;port B: parallel I/O
movep #-1,x:m_pbddr ;port B: all output
MSG($1)
MSG($1|3<<4) ;clear strobes
loop
move #>$000000,x0 ;pattern
jsr <dopat
move #>$AAAAAA,x0 ;pattern
jsr <dopat
jsr <iatest
move #>$555555,x0 ;pattern
jsr <dopat
jsr <iatest
move #>$FFFFFF,x0 ;pattern
jsr <dopat
move #>$DEADEE,x0 ;pattern
jsr <dopat
jsr <iatest
move #>$123456,x0 ;pattern
jsr <dopat
move #>$876543,x0 ;pattern
jsr <dopat
jsr <iatest
jmp <loop
iatest
move #$1a,a
jsr <disp ;show which test
move #start,r0
move #len,x1
do x1,iafill
move r0,a
not a
move a,x:(r0)+
iafill
move #start,r0
move #len,x1
do x1,iacheck
move x:(r0)+,a1
move r0,b
not b
move b,x0
eor x0,a
jne <error
iacheck
rts
dopat
move x0,n7
move x0,a
jsr <disp ;show which pattern
move n7,x0
move #len,x1
jsr <patfill
jsr <patcheck
rts
patfill
move #start,r0
do x1,lfill
move x0,x:(r0)+
lfill
rts
patcheck
move #start,r0
do x1,lcheck
move x:(r0)+,a1
eor x0,a
jne <error
lcheck
rts
blink1 equ 300
blink2 equ 4000
error
move x0,a1
jsr <disp ;display error code
eloop
bclr #13,x:m_pbd
bclr #14,x:m_pbd
do #blink1,el1
rep #blink2
nop
el1
bset #13,x:m_pbd
bset #14,x:m_pbd
do #blink1,el2
rep #blink2
nop
el2
jmp <eloop
include 'disp.a56'